﻿//------------------------------------------------------------------------------
// <pcdd-entitiy>
//     彩票主流业务类库
//     房间回水业务对象
// </pcdd-entitiy>
//------------------------------------------------------------------------------ 

using CL.Game.DAL;
using CL.Game.Entity;
using CL.View.Entity.Game;
using System.Collections.Generic;
using System.Linq;

namespace CL.Game.BLL
{
    /// <summary>
    /// RoomRebateBLL 业务
    /// </summary>
    public class RoomRebateBLL
    {
        RoomRebateDAL dal = new RoomRebateDAL(Enum.Common.DbConnectionEnum.CaileGame);

        /// <summary>
        /// 插入对象
        /// </summary>
        /// <param name="Entity"></param>
        /// <returns></returns>
        public long InsertEntity(RoomRebateEntity Entity)
        {
            return dal.Insert_Long(Entity) ?? 0;
        }
        /// <summary>
        /// 更新对象
        /// </summary>
        /// <param name="Entity"></param>
        /// <returns></returns>
        public long ModifyEntity(RoomRebateEntity Entity)
        {
            return dal.Update(Entity);
        }
        /// <summary>
        /// 批量插入
        /// </summary>
        /// <param name="Entitys"></param>
        /// <returns></returns>
        public bool InsertEntitys(List<RoomRebateEntity> Entitys)
        {
            return dal.InsertEntity(Entitys);
        }
        /// <summary>
        /// 根据房间标识查询回水列表
        /// </summary>
        /// <param name="RoomID"></param>
        /// <returns></returns>
        public List<RoomRebateEntity> QueryListByRoomID(long RoomID)
        {
            return dal.GetList(new { RoomID = RoomID }, "RebateID ASC").ToList();
        }
        /// <summary>
        /// 查询可回水对象集
        /// </summary>
        /// <returns></returns>
        public List<cv_RebateList> QueryRebateList()
        {
            return dal.QueryRebateList();
        }
        /// <summary>
        /// 保存会员回水
        /// </summary>
        /// <param name="Entitys"></param>
        /// <returns></returns>
        public bool SaveUserRebate(List<cv_Rebate> Entitys)
        {
            return dal.SaveUserRebate(Entitys);
        }

    }
}
